<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录成功页面</title>
</head>
<body>

<input id="username" type="hidden" value="">
<button type="button" onclick="showName()">点击此处</button>
<script>
    function showName() {
        var elementById = document.getElementById("username");
        document.write('<h1 style="color: red">'+elementById.value+'</h1>')
    }
</script>
</body>
</html>